package com.fitbet.wechat.dao;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;
import com.fitbet.entity.bet.Bet;
import com.fitbet.entity.bet.BetStatus;

@Dao("hibernate")
public interface BetDao {
    
    /**
     * 
     * @param time
     * @param betStatus
     * @return
     */
    @Query("FROM Bet WHERE status = :status AND disabled = false")
    public Bet loadCurrentBet(@Variable("status") BetStatus betStatus);
    
    /**
     * 
     * @param id
     * @param betStatus
     * @return
     */
    @Query("FROM Bet WHERE id = :id AND status = :status AND disabled = false")
    public Bet loadBet(@Variable("id") Long id, @Variable("status") BetStatus betStatus);
}
